package org.fage.semples.dao;

import java.util.List;

import org.fage.semples.model.ExamUserSubject;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
@Transactional
public class ExamUserSubjectHiberanteDAOImpI extends BaseHibernateDAO<ExamUserSubject> implements ExamUserSubjectHiberanteDAO{

	@Override
	public List<ExamUserSubject> findAllExamUserSubjects() {
		return this.find("FROM ExamUserSubject");
	}
	
	public List<ExamUserSubject> getByUserIdExamUserSubjects(String userId) {
		return this.queryForList("FROM ExamUserSubject AS us WHERE us.examUser.userId=?", new Object[]{userId});
	}
}
